#ifndef MAINCHAT_H
#define MAINCHAT_H

#include <QWidget>
#include <QTcpSocket>


namespace Ui {
class mainchat;
}

class mainchat : public QWidget
{
    Q_OBJECT

public:
    explicit mainchat(QWidget *parent, QString name);

    //重写关闭事件
    void closeEvent(QCloseEvent *);



    ~mainchat();

signals:
    void closechat();

private slots:
    void on_btnsend_clicked();

    void on_btnlink_clicked();

    void getipData(QString data);
    void getportData(QString data);
    void getmyname(QString data);

private:
    Ui::mainchat *ui;
    QTcpSocket *m_tcp;

    QString myname;
};

#endif // MAINCHAT_H
